home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
5_3.lha
/
5_3
/
5_3tst.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-08
|
836b
|
40 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <stream.h>
include <error.h>
include "5_3.h" // class strset
include "5_3a.c" // strset::strset
include "5_3b.c" // strset::~strset
include "5_3c.c" // strset::insert
include "5_3d.c" // strset::member
har *x[] =
"hello", "there", "this", "is", "a", "test", "of", "lists",
"the", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "black", "dog", 0
;
ain()
strset s(30);
cout << "member(of) = " << s.member("of") << "\n";
for (char **xp = x; *xp; xp++)
s.insert(*xp);
cout << "member(of) = " << s.member("of") << "\n";
int i;
for (s.iterate(i); s.ok(i); )
{
cout << "i = " << i << ", '";
char *t = s.next(i);
cout << t << "'\n";
}
return 0;